import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import other from './modules/other'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    username: '张三'
  },
  getters: {
    getUsername (state) {
      return '姓名:' + state.username
    }
  },
  mutations: {},
  actions: {},
  modules: {
    // 方便维护管理
    user: user,
    other,
    home: {}
  }
})
